package cn.hn3l.agriculture.entitis.behoof;

/**
 * @Author Wang Weiwei
 * @Since 16-10-17
 * @Describe
 * 作物
 */
public class Crop implements Comparable<Crop> {
    private int id;
    private String name;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    public int compareTo(Crop o) {
        if (this.getName().equals(o.getName())) return 0;
        return this.getId() > o.getId() ? 1 : -1;
    }
}
